package com.usian.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.dto.UserSearchDto;
import com.usian.search.ApUserSearchControllerApi;
import com.usian.service.ApUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController implements ApUserSearchControllerApi {
    @Autowired
    private ApUserSearchService apUserSearchService;

    @Override
    @PostMapping("/load")
    public ResponseResult findList(@RequestBody UserSearchDto dto) {
        return apUserSearchService.findList(dto);
    }

    @Override
    @PostMapping("/del")
    public ResponseResult delSearch(@RequestBody UserSearchDto dto) {
        return apUserSearchService.delSearch(dto);
    }
}
